package com.csx.hashcode;

import java.util.HashMap;
import java.util.HashSet;

/**
 * @author 陈胤训
 * @date 2019/6/20 14:49
 * Utils: Intellij Idea
 * Description:
 */
public class Main {
    public static void main(String[] args) {
        int a  = 42;
        System.out.println(((Integer)a).hashCode());

        int b = -42;
        System.out.println(((Integer)b).hashCode());

        double c = 3.1415926;
        System.out.println(((Double)c).hashCode());

        String d = "imooc";
        System.out.println(d.hashCode());

        Student student = new Student(3, 10, "csx", "cyx");
        System.out.println(student.hashCode());

        HashMap<Student, Integer> hashMap = new HashMap<>();
        hashMap.put(student, 100);

        HashSet<Student> students = new HashSet<>();
        students.add(student);

    }
}
